-
-
Notifications
You must be signed in to change notification settings - Fork 421
Bump OS-Lib #5048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump OS-Lib #5048
Conversation
|
@vaslabs seems like upgrading OS-Lib is hitting issues in the android test. Do you know what zip file it is trying to unzip? If we could get the zip standalone outside of the mill test suite, that would make it much easier to debug the os-lib issue upstream |
|
I'll check, give me some time EDIT: Issue looks different now, I'm investigating |
|
@lihaoyi looks like the permissions are not set properly basically androidx is a directory and should have EDIT: don't know if it helps, but it's the first directory in the directory tree inside a zip, it looks like the directories after that are fine EDIT2: looks like it happened only for androidx test, maybe there's something peculiar about this particular zip file EDIT3: There are multiple jars being extracted to classes/ and classes/androidx so maybe that contributes to the issue (these files are the ones we extract from aar) EDIT4: I'll need more time, need to get os lib and build it locally to do more tests |
|
looks like the androidx junit 1.2.1 doesn't have any unix file attributes ( I'll check if it's originally like that or we mess it up somehow EDIT: it's originally like that, others seem to have proper unix attributes that look like: |
|
Got it, it could be a weakness in the new zip implementation that @kiendang worked on, but probably fixable |
Yeah it's a very peculiar use case, I checked the newest version of androidx junit, has the same issue. Let me know if you need any help to try things to fix it or how to reproduce. The problematic jar can be found here (classes.jar in the aar) |
|
If someone points me to the code where the jar is unzipped, I can take a look. |
|
The problem is Examples:
I tried using the Previously it works because |
|
Thanks for the investigation @kiendang. So for the given I guess the fix would be to make OS-Lib add the "executable" bit to all folders regardless of the zip file's permissions, so at least we are able to create the nested directory contents without crashing? |
|
Yup maybe " Adding |
|
Got it. @kiendang could you send a PR? |
|
Shouldn't we first create the content, and then apply the permissions? If that means, the directory won't be accessible any longer, so be it. |
Yea I think that's how the However I think in this case with |
to prevent crash in cases where directories is missing READ/EXECUTE permission Added a test that - creates a zip file with directories without READ/EXECUTE permissions - `os.unzip` everything successfully - re-adds READ and EXECUTE permissions to directories see my and @lefou's comments #387 (comment) com-lihaoyi/mill#5048 (comment) Tested with the android test. Here is the permission fix at the call site (`AndroidApModule.scala`) com-lihaoyi/mill@main...kiendang:mill:fix-android-classesjar-unzip#diff-49ebd9c68d1348785194e15a80d62f0845c26386e722d3f5d43429238bbf7616 @lihaoyi @vaslabs
|
Updated this PR with @kiendang's latest updates to OS-Lib, let's see how it goes |






Split out from #5043 due to apparent breakage in the upgrade